package cn.xfdzx.android.apps.shop.activity.ruzhu;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.OnClick;
import cn.xfdzx.android.apps.shop.R;
import cn.xfdzx.android.apps.shop.base.BaseMvpActivity;
import cn.xfdzx.android.apps.shop.bean.GetJieguoBeen;
import cn.xfdzx.android.apps.shop.contract.ExaminContract;
import cn.xfdzx.android.apps.shop.presenter.ExminPresenter;

public class BohuiActivity extends BaseMvpActivity<ExminPresenter> implements ExaminContract.View {


    @BindView(R.id.ll_state)
    LinearLayout llState;
    @BindView(R.id.iv_back)
    ImageView ivBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.rl_title)
    RelativeLayout rlTitle;
    @BindView(R.id.tv_title_name)
    TextView tvTitleName;
    @BindView(R.id.image)
    ImageView image;
    @BindView(R.id.tishi)
    TextView tishi;
    @BindView(R.id.rl_shop_photo)
    RelativeLayout rlShopPhoto;
    @BindView(R.id.tv_yi_du)
    TextView tvYiDu;
    @BindView(R.id.text)
    TextView text;

    @Override
    public int getLayoutId() {
        return R.layout.activity_bohui;
    }

    @Override
    public void initView() {
        mPresenter = new ExminPresenter();
        mPresenter.attachView(this);
        mPresenter.forJieGuo();
    }

    @Override
    public void onJieGuo(GetJieguoBeen been) {
        tishi.setText(been.getData().getApplyment_state_desc());
        for (int i = 0; i < been.getData().getAudit_detail().size(); i++) {
            text.setText(been.getData().getAudit_detail().get(i).getReject_reason());

        }
    }

    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }

    @Override
    public void onError(Throwable throwable) {

    }



    @OnClick({R.id.iv_back, R.id.tv_yi_du})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.iv_back:
                finish();
                break;
            case R.id.tv_yi_du:
                finish();
                Intent intent = new Intent(this, InformationActivity.class);
                startActivity(intent);
                break;
        }
    }
}